package com.example.weight.navigation;

import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.view.View;

import androidx.appcompat.app.AppCompatActivity;

import com.example.weight.R;
import com.example.weight.greenSeasons.waterDeal.BackwashTable;
import com.example.weight.greenSeasons.waterDeal.ErrorRecordTable;
import com.example.weight.greenSeasons.waterDeal.SendWaterTable;
import com.example.weight.greenSeasons.waterDeal.UseElectricityTable;
import com.example.weight.greenSeasons.waterDeal.WaterTreatmentTable;
import com.example.weight.householdWaste.ChoseRoleActivity;
import com.hjq.bar.OnTitleBarListener;
import com.hjq.bar.TitleBar;

public class ShengchanxianchangShuichuliNavigationActivity extends AppCompatActivity {

    private String name, factory;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_shengchanxianchang_shuichuli_nav);

        Intent previousIntent = getIntent();
        name = previousIntent.getStringExtra("name");
        factory = previousIntent.getStringExtra("factory");

        TitleBar titleBar = findViewById(R.id.sijiqing_water_deal_nav_titleBar);
        titleBar.setOnTitleBarListener(new OnTitleBarListener() {
            @Override
            public void onLeftClick(View v) {
                finish();
            }

            @Override
            public void onTitleClick(View v) {}

            @Override
            public void onRightClick(View v) {}
        });
    }

    public void turnBackWash(View view) {
        Intent intent =new Intent(ShengchanxianchangShuichuliNavigationActivity.this, BackwashTable.class);
        intent.putExtra("name", name);
        intent.putExtra("factory", factory);
        startActivity(intent);
    }
    public void turnSendWater(View view) {
        Intent intent =new Intent(ShengchanxianchangShuichuliNavigationActivity.this, SendWaterTable.class);
        intent.putExtra("name", name);
        intent.putExtra("factory", factory);
        startActivity(intent);
    }

    public void turnEquipmentCheck(View view) {
        Intent intent =new Intent(ShengchanxianchangShuichuliNavigationActivity.this, ChoseRoleActivity.class);
        intent.putExtra("name", name);
        intent.putExtra("factory", factory);
        intent.putExtra("fName", "shebeijiancha8_4");
        startActivity(intent);
    }
    public void turnEquipmentDailyMaintain(View view) {
        Intent intent =new Intent(ShengchanxianchangShuichuliNavigationActivity.this, ChoseRoleActivity.class);
        intent.putExtra("name", name);
        intent.putExtra("factory", factory);
        intent.putExtra("fName", "equipmentDailyMaintain");
        startActivity(intent);
    }

    public void turnEquipmentMonthlyMaintain(View view) {
        Intent intent =new Intent(ShengchanxianchangShuichuliNavigationActivity.this, ChoseRoleActivity.class);
        intent.putExtra("name", name);
        intent.putExtra("factory", factory);
        intent.putExtra("fName", "equipmentMonthlyMaintain");
        startActivity(intent);
    }
}
